package cn.zyx.oa.entity;

import cn.zyx.common.entity.DataEntity;
import cn.zyx.sys.entity.User;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.validator.constraints.Length;

import java.util.Date;


/**
 * 通知通告记录Entity
 *
 * @author zyx
 */
@EqualsAndHashCode(callSuper = true)
@Data
public class OaNotifyRecord extends DataEntity<OaNotifyRecord> {

    private static final long serialVersionUID = 1L;
    private OaNotify oaNotify;        // 通知通告ID
    private User user;                // 接受人
    @Length(min = 0, max = 1, message = "阅读标记（0：未读；1：已读）长度必须介于 0 和 1 之间")
    private String readFlag;          // 阅读标记（0：未读；1：已读）
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date readDate;            // 阅读时间

    public OaNotifyRecord() {
        super();
    }

    public OaNotifyRecord(String id) {
        super(id);
    }

    public OaNotifyRecord(OaNotify oaNotify) {
        this.oaNotify = oaNotify;
    }


}